<form id="{{ field.formid }}"
      {%- if field.action %}
      action="{{ field.action }}"
      {%- endif %}
      method="{{ field.method }}"
      enctype="multipart/form-data"
      accept-charset="utf-8"
      class="form {{ field.css_class or '' }}">
  <input type="hidden" name="__formid__" value="{{ field.formid }}" />

  {%- for f in field.children -%}
    {{ field.renderer(field.widget.item_template, field=f, cstruct=cstruct.get(f.name, null)) }}
  {% endfor -%}

  {% if field.footer %}
  <div class="form-presubmit-footer">
    <span>{{ field.footer | safe }}</span>
  </div>
  {% endif %}

  <div class="form-actions">
    {% if field.back_link %}
    <a class="btn btn--cancel"
       href="{{ field.back_link.href }}">{{ field.back_link.text }}</a>
    {% endif %}
    <div class="u-stretch"></div>
    <div class="form-actions__buttons">
      {%- for button in field.buttons -%}
        <button id="{{ field.formid + button.name }}"
                name="{{ button.name }}"
                type="{{ button.type }}"
                class="form-actions__btn btn{% if button.css_class %} {{ button.css_class }}{% endif %}"
                value="{{ _(button.value) }}"
                {%- if button.disabled -%}
                disabled="disabled"
                {% endif -%}
                >
        {{ _(button.title) }}
        </button>
      {% endfor -%}
    </div>
  </div>
</form>
